package com.ky.gp.app.controller;

import com.ky.common.param.CommentAdd;
import com.ky.common.vo.R;
import com.ky.gp.app.service.CommentFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * --- 天道酬勤 ---
 *
 * @author 1379
 * @date 2024/6/22
 * @desc -- 代码敲烂 月薪过万--
 */
@RestController
@RequestMapping("/api/course")
public class CommentController {

    @Autowired
    private CommentFeign commentFeign;

    @GetMapping("/getCourseComment/{courseId}")
    public R getCommentList(@PathVariable("courseId") Integer courseId){
        return  commentFeign.getCommentList(courseId);
    }

    @PostMapping("/submitComment")
    public R submitComment(@RequestBody CommentAdd commentAdd){
        return commentFeign.submitComment(commentAdd);
    }
}
